import request from '@/utils/request'

export function getList(params) {
  return request({
    url: 'api/product/back/category/list',
    method: 'get',
    params
  })
}
export function getTree() {
  return request({
    url: 'api/product/back/category/tree',
    method: 'get'
  })
}
export function saveCagegory(data) {
  return request({
    url: 'api/product/back/category/save',
    method: 'post',
    data
  })
}
export function deleteCategory(id) {
  return request({
    url: 'api/manage/back/dept',
    method: 'delete',
    data: id
  })
}
export default { getList, getTree, saveCagegory, deleteCategory }
